package bsplib.q3bsp;
import flash.utils.ByteArray;

class Q3Leaf
{
    public static inline var DIR_INDEX : UInt = 4;
    
    public var cluster : Int;
    public var area : Int;
    public var mins : Q3Vec3i;
    public var maxs : Q3Vec3i;
    public var leafFace : Int;
    public var nLeafFaces : Int;
    public var leafBrush : Int;
    public var nLeafBrushes : Int;
    
    public function new( data : ByteArray )
    {
        cluster = data.readInt();
        area = data.readInt();
        mins = Q3Vec3i.FromByteArray(data);
        maxs = Q3Vec3i.FromByteArray(data);
        leafFace = data.readInt();
        nLeafFaces = data.readInt();
        leafBrush = data.readInt();
        nLeafBrushes = data.readInt();
    }

}